The flash_demo application can run from either internal RAM or Flash and uses the Standard Software Drivers (SSD) to erase and program different regions of flash, and run swap if supported on the device.
More...
Flash Demo User Guide
Getting started
The Flash Demo example code walks through different examples of how to erase and program flash contents and use the swap feature if it is supported on the device.
Default Debugger Connection
1. TWR-K64F120M (on board OpenSDA)
2. FRDM-K64F120M (on board OpenSDA)
Commands/Directions
-
Select Flash_Debug target. Both Flash_Debug and Ram_Debug targets are available.
Flash_Debug supports Swap feature for devices that support Swap (K64F).
-
Connect one end of the USB cable to a PC host and the other end to the OpenSDA connector on the board.
-
Open Terminal program such as TeraTerm, Putty, or Hyperterminal.
-
Configure the Terminal program to select the OpenSDA COMx port for the board, using 115200 8N1: 115200 baud, 8 data bits, No parity, 1 Stop bit.
-
Connect to the board with the debugger (download & debug), run the program, and view the Terminal messages for flash operations being performed.
-
For devices that support Swap, the Flash_Debug target will copy (program) the application that is running from the lower block to the upper block, and then swap commands will be issued.
-
Flash memory blocks will be swapped at the next reset. Disconnect debug session and hit the reset button on the board.
-
Also note, during swap, memory locations 0x7F000 & 0xFF000 are swapped and displayed on the terminal showing how the memory map changes.
-
For devices that do not support swap, simply view the terminal messages for flash operations that are occurring for the demo.
-
Optionally, run the Ram_Debug target, which supports additional commands like FlashEraseAllBlock() which are not possible when executing code from flash memory space.
-
Terminal will display "Flash Demo Complete!" when finished.
Note: GCC Builds only support "Flash Debug" target